import {
    request
} from '@/utils/request.js'
export function release_scope_search(data) { //列表
    return request({
        url: '/index/release_scope_search',
        method: 'post',
        data
    })
}


export function getSelectCityList(country = "", pid = 0, port = 0) {
    return request({
        url: '/basic/getSelectCityList',
        method: 'get',
        data: {
            country,
            pid,
            port
        }
    })
}

/**
 * @name 提交发布-获取返回信息
 * @param {*} country 
 * @param {*} pid 
 * @param {*} port 
 * @returns 
 */
export function SendAddress(data) {
    return request({
        url: '/index/select_address',
        method: 'post',
        data
    })
}

// 获取包装方式列表
export function getPackageTypes() {
    return request({
        url: '/index/package',
        method: 'post'
    })
}

// 获取装卸方式列表
export function getUnloadTypes() {
    return request({
        url: '/index/unload',
        method: 'post'
    })
}

// 提交货物信息
export function submitGoodsInfo(data) {
    return request({
        url: '/index/goods',
        method: 'post',
        data
    })
}

// 获取车长列表
export function getDeliverySizes(transport_way) {
    return request({
        url: '/index/delivery_size',
        method: 'post',
        data: { transport_way }
    })
}

// 获取车型列表
export function getDeliveryVehicles(transport_way) {
    return request({
        url: '/index/delivery_vehicle',
        method: 'post',
        data: { transport_way }
    })
}

// 获取车皮列表
export function getCarPies(transport_way) {
    return request({
        url: '/index/railway_wagon',
        method: 'post',
        data: { transport_way }
    })
}


//货运期间服务相关协议
export function getDeliveryContent() {
    return request({
        url: '/index/delivery_content',
        method: 'post'
    })
}

//获取路线列表
export function getRouteList(data) {
    return request({
        url: '/index/route_present',
        method: 'post',
        data
    })
}

//提交
export function submitPublish(data) {
    return request({
        url: '/index/delivery',
        method: 'post',
        data
    })
}

// 获取车辆列表
export function getVehicleList(data) {
    return request({
        url: '/quotation/car_search',
        method: 'post',
        data
    })
}

//关联订单查询
export function getOrderList(data) {
    return request({
        url: '/index/related_order',
        method: 'post',
        data
    })
}


//根据关键字获取城市
export function getCityByKeyword({ keyword, city_id }) {
    return request({
        url: '/basic/search_city',
        method: 'post',
        data: { keyword, city_id }
    })
}

// 提交服务信息
export function submitServiceInfo(data) {
    return request({
        url: '/index/request_clearance',
        method: 'post',
        data
    })
}

// 选择员工创建运踪
export function createOrderDynamics(data) {
    return request({
        url: '/record/delivery_task_divide',
        method: 'post',
        data
    })
}

//获取运踪列表
export function getOrderDynamicsList(data) {
    return request({
        url: '/record/delivery_step',
        method: 'post',
        data
    })
}

//提交运踪状态
export function submitOrderDynamics(data) {
    return request({
        url: '/record/create_step',
        method: 'post',
        data
    })
}


//根据订单号获取我的报价
export function getMyQuote(data) {
    return request({
        url: '/quotation/info',
        method: 'post',
        data
    })
}

//取消报价
export function cancelQuote(data) {
    return request({
        url: '/quotation/cancel_quotation',
        method: 'post',
        data
    })
}

//订单详情
export function getOrderDetail(data) {
    return request({
        url: '/index/delivery_find',
        method: 'post',
        data
    })
}


//删除员工
export function deleteEmployee(data) {
    return request({
        url: '/basic/staff_del',
        method: 'post',
        data
    })
}

//获取运踪流程模板
export function getOrderDynamicsTemplate(data) {
    return request({
        url: '/index/process_template',
        method: 'post',
        data
    })
}

//获取发起绑定的邀请列表
export function getInviteList(data) {
    return request({
        url: '/index/request_record',
        method: 'post',
        data
    })
}

// 确认收货
export function deliveryTake(data) {
    return request({
        url: '/index/delivery_take',
        method: 'post',
        data
    })
}
